/*  
 *  Copyright (c) 2008 Adrian Necimal <necimal@gmail.com>
 *  
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

Cu.import("resource://app/jsmodules/sbLibraryUtils.jsm");
Cu.import("resource://app/jsmodules/sbProperties.jsm");

// Make a namespace.
var LibraryImportExport = {};

LibraryImportExport.importLibrary = function() {
    alert("library import not yet implemented!");
}

LibraryImportExport.exportLibrary = function() {
    var libraryFile = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
    libraryFile.initWithPath("c:\\temp\\library.xml");
    
    var exportDialog = window.open("chrome://library-importexport/content/library-importexport-progress.xul",
                                   null, "chrome,resizable=no,modal,centerscreen");
    alert(exportDialog);
    
    var nLIES = Cc["@necimal.com/library/importexportservice;1"].getService().wrappedJSObject;
    //nLIES.exportLibrary(LibraryUtils.mainLibrary, libraryFile);
}
